<template>
	<view>
		<view class="swiper">
			<swiper class="swiper-box" circular indicator-dots autoplay interval="2000" duration="500"
				indicator-color="#676767" indicator-active-color="#FFFFFF ">
				<swiper-item v-for="(item, index) in swiperList" :key="index">
					<image class="swiper-item" :src="item.dictInfoImg"></image>
				</swiper-item>
			</swiper>
		</view>
	</view>
</template>

<script>
// @ts-nocheck
	import {
		dictAll,
	} from '@/api/api.js';
	export default {
		props:{
			bannerCode:String
		},
		data() {
			return {
				swiperList: [{
						dictInfoImg: '/static/img/swiper.png'
					},
					{
						dictInfoImg: '/static/img/swiper.png'
					},
					{
						dictInfoImg: '/static/img/swiper.png'
					}
				], //轮播
			}
		},
		mounted() {
			console.log(this.bannerCode)
			this.getSwiperList() //获取轮播图
		},
		methods: {
			// 获取轮播图
			getSwiperList() {
				let params = {
					dictCode: this.bannerCode
				};
				dictAll(params).then(res => {
					// console.log('轮播图：', res)
					if (res.code == 'A000') {
						this.swiperList = res.data;
					}
				});
			},
		}
	}
</script>

<style>
</style>
